package com.itbaizhan.test.exercise;

/**
 * 多态
 */
public class Animal2 {
    public void shout(){
        System.out.println("叫一声");
    }
}
class Dog extends Animal2 {
    public void shout(){
        System.out.println("旺旺");
    }
    public void seeDoor(){
        System.out.println("看门中");
    }
}
class Cat extends Animal2 {
    public void shout(){
        System.out.println("喵喵");
    }
    public void catchMouse(){
        System.out.println("Cat.catchMouse");
    }
}
